package com.yinhd.study.designPatterns.Interviewer.course;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: study
 * @description:
 * @Author: chengl
 * @create: 2022-02-08 10:46
 **/
public class Test {
    public static void main(String[] args) {
        List<Course> courses = new ArrayList<>();
        FreeCourse freeCourse = new FreeCourse();
        freeCourse.setName("GA/T-1400协议");
        PracticeCourse practiceCourse = new PracticeCourse();
        practiceCourse.setPrice(100.0);
        practiceCourse.setName("接口要求规范");
        courses.add(freeCourse);
        courses.add(practiceCourse);
        Boss boss = new Boss();
        for (Course course : courses) {
            course.accept(boss);
        }

    }
}
